// Copyright 2010 Alexandre Tristan St-Cyr <tristan.stcyr@gmail.com>

package com.codeplex.loadjava.model;

public class MethodException {
	
	private Method method;
	
	private JavaClass exceptionClass;
	
	public MethodException(Method method, JavaClass exceptionClass) {
		this.method = method;
		this.exceptionClass = exceptionClass;
	}
	
	public Method getMethod()
	{
		return this.method;
	}
	
	public JavaClass getExceptionClass()
	{
		return this.exceptionClass;
	}
	
	@Override
	public boolean equals(Object o) {
		if (!this.getClass().isInstance(o)) {
			return false;
		}
		MethodException other = (MethodException)o;
		return this.method.equals(other.method)
			&& this.exceptionClass.equals(other.exceptionClass);
	}
}
